//
//  NSMutableArray+converArray.m
//  oc-09课堂代码练习
//
//  Created by 李世友 on 16/4/27.
//  Copyright © 2016年 李世友. All rights reserved.
//

#import "NSMutableArray+converArray.h"


@implementation NSMutableArray (converArray)
-(void)convertArray
{
    if (self.count % 2 == 1)
    {
        
        for (NSInteger i = 0; i <= (self.count - 1) / 2 - 1; i++)
        {
            [self exchangeObjectAtIndex:i withObjectAtIndex:self.count - i -1 ];
        }
    }
    else
    {
        for (NSInteger i = 0; i <= self.count / 2 - 1; i++)
        {
            [self exchangeObjectAtIndex:i withObjectAtIndex:self.count - i -1 ];
        }
    }
   

}
@end
